#include<bits/stdc++.h>
using namespace std;
#define M 100000
typedef long long ll;
ll n,mina,rest;
ll r[M],cnt[M];

int find(int x){
    int l=0,k=n;
    while(l<k){
        int mid=l+(k-l)/2;
        if(r[mid]<=x)l=mid+1;
        else k=mid;
    }
    if(r[l-1]==x)return l;
    else return -1;
}

int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    ios::sync_with_stdio(false);
    cin>>n;
    for(int i=0;i<n;i++)cin>>r[i];
    memset(cnt,1,sizeof(cnt));
    sort(r,r+n);
    mina=r[0];
    for(int j=find(mina);j<n;j++){
        for(int i=0;i<j;i++){
            if(cnt[i]){
                if(r[j]>r[i]){
                    cnt[i]=0;
                    break;
                }
            }
        }
    }
    for(int i=0;i<n;i++){
        if(cnt[i])rest++;
    }
    cout<<rest;
    return 0;
}
